package com.itheima.chapter03.service.impl;

import com.itheima.chapter03.entity.Discuss;
import com.itheima.chapter03.repository.DiscussRepository;
import com.itheima.chapter03.service.DiscussService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class DiscussServiceImpl implements DiscussService {
    @Autowired
    private DiscussRepository discussRepository;

    @Override
    public int insertDiscuss(Discuss discuss) {
        return discussRepository.insertDiscuss(discuss.getAuthor(), discuss.getContent(), discuss.getAId());
    }
}
